#ifndef CAR_H
#define CAR_H

#include "Sprite.h"
#include "Header.h"
#include <fstream>
#include <vector>

class Car:public Sprite
{
private:
	std::vector<Point> points;
	std::vector<Triangle> faces;
	std::vector<Texture> textures;
	std::vector<TextureIndex> textureindex;

	Point position;
	Point direction;
	float turn;

	bool readPoints(const char * points);
	bool readFaces(const char *faces);
	bool readTexture(const char *texture);
	bool readTextureIndex(const char *textureindex);

public:
	Car();
	Car(const char *points, const char *faces, const char *textures, const char *textureindex);
	void Update();
	void Draw();
	void Forward();
	void Back();
	void TurnLeft();
	void TurnRight();
};

#endif